// dlg.txt

//		mark_quest_dest(zone,x,y,layer,quest);
//		cancel_out_fight(0,short kill_enc);
//		make_outdoor_enc(short x,short y,short which_enc);
//		set_out_fight_field(short which_field);
// 				which_field is 0-20

begintalkscript;

variables;

short this_sec = 46;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "To the north, you see the crumbling ruins of a fort. It is very old. It has probably been occupied and razed many times in the centuries since it was constructed.";
	text2 = "Now it is held by raiders. You can see bands of savage ka-beasts milling around at its base. Human guards watch the fortifications. When you come into view, many blades are drawn.";
	text3 = "From this distance, it doesn't look like anyone is at the top of the tower. It has mostly fallen apart. You do see, atop the highest surviving battlement, a tattered banner. You can't make out any details from this distance.";
	code =
		sf(100 + this_sec,1,1);
	break;

	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "You find a huge nest, built from scorched rocks and stripped-off chunks of palm trees. The ground around it is scarred by drake tracks. The huge beasts have been nesting out here.";
	text2 = "Nothing nasty is lurking about, so you search the nest. You find the broken shells of enormous eggs. You also find a bunch of coins and a few chunks of deep metal.";
	code =
		sf(100 + this_sec,2,1);
		change_coins(103,1);
		change_crafting(0,0,0,1,0);
		
	break;
begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "Brigands pour out of all the buildings from all directions. You are barely able to adopt a good defensive position before they are upon you.";
	code =
		set_out_fight_field(6);
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "Now that your attackers have faced the justice of Haven, you search the buildings.";
	text2 = "It looks like the clan who lived here abandoned their claim weeks ago. The brigands moved in and have been ambushing travelers ever since. You find some coins, some jewelry, and a scroll tube.";
	code =
		change_coins(74,1);
		reward_give(406);
	break;

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = gf(146,16) == 0;
	question = "Name";
	text1 = "Remarkably, one tenacious Dhagan clan has managed to survive out here. They have three halls, surrounded by rows of dusty stone blocks.";
	text2 = "There are numerous armed men and women about, watching for visitors and looking at the piles of stone. Their tools are on the ground at their feet. They easily see you on this broad, flat expanse of sand.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Approach them.";
	text1 = "You approach the armed warriors. When you get close to the men and women, you note that they are not all Dhagans. Their weapons and armor are dirty and mismatched. The tools at their feet are rusty. Some are broken.";
	text2 = "Then you get close enough to see their eyes. Their cold, hostile eyes. They aren't stoneworkers. They are brigands. They spring the trap.";
	action = END_TALK;
	code =
		sf(146,16,1);
		make_outdoor_enc(314,199,0);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Pass by.";
	text1 = "As you go, they wave goodbye.";
	action = END_TALK;
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "There is an oasis to the east. Normally, you'd think these Dhagan men would be there, sheltered and comfortable, instead of out here in the sandy wastes.";
	text2 = "Instead they scowl at the oasis. They nod as you approach. _Hello, Haven._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Hello._";
	text1 = "The Dhagans don't respond.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_What is this place?_";
	text1 = "One of the men says, _It's the Stinging Oasis. A foul place._";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_How so?_";
	text1 = "_Disobedient women flee here. They refuse our ways, and they come here. We're not allowed to stop them. They are protected._";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "_Who protects them?_";
	text1 = "He spits. _Haven does. You don't respect our ways. This refuge was made a long time ago. A bit of grit in our eyes._";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_And why are you here?_";
	text1 = "They look at the ground. All of them except one scarred man, who looks at the oasis with rage in his eyes. This one says, _Not your business, Haven._";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_I am a [P] of Haven, and you will show some respect._";
	text1 = "They are suitably cowed by the presence of royalty.";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_Haven should be more respecting of your ways._";
	text1 = "The men nod, relieved that someone can see their point of view. They nod farewell and disappear into the dunes.";
	action = END_TALK;
	code =
		ro_faction(1);
		cancel_out_fight(1,1);
	break;
	
begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_I'm glad someone is protecting your women from you._";
	text1 = "The men are clearly angry, but they have no response to this. At least, no response right now. They turn away and disappear into the dunes.";
	action = END_TALK;
	code =
		ro_faction(-4);
		cancel_out_fight(1,1);
	break;

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_I think you'd better be moving on._";
	text1 = "The men have no response to this. At least, no response right now. They turn away and disappear into the dunes.";
	action = END_TALK;
		code =
		ro_faction(-2);
		cancel_out_fight(1,1);
	break;

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				